package com.tech.platform.cms.authz.common.exception;

import com.tech.platform.cms.common.constant.Constant;

public class GetTokenException extends RuntimeException{

    private Integer code;
    private String errorMessage;

    public GetTokenException() {
        super("获取token失败！");
        this.code = Constant.AUTHORIZATIONERROR;
        this.errorMessage = "获取token失败！";
    }

    public GetTokenException(int code,String msg){
        super(msg);
        this.code = code;
        this.errorMessage = msg;
    }

    public GetTokenException(Exception exception) {
        super(exception.getMessage());
        this.code = Constant.AUTHORIZATIONERROR;
        this.errorMessage = exception.getMessage();
    }
}
